<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ page import="crm.model.Material" %>
<%@ page import="crm.control.MaterialControl"%>
<%@ page import="java.util.*"  %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>删除常备资料</title>
  </head>
  
  <body>
        <%
           request.setCharacterEncoding("UTF-8");
           String href = "material.jsp";
           int id = Integer.parseInt(request.getParameter("id"));
           System.out.println(id);
          MaterialControl mc = new MaterialControl();
           if(mc.deleteMaterial(id))
           {
    %>
	<script language = "javascript">
		
		window.location.href = "material_download.jsp";

	</script>
	<%} else { %>
	<script language="javascript">
		alert("删除失败！");
		window.location.href = "material_download.jsp";

	</script>
    <%} %>
  </body>
</html>
